#include"comm.hpp"
int main(){
    int n = Create_Pipe(PIPE_NAME.c_str());
    if(n == false){
        perror("mkfifo");
        exit(-1);
    }
    cout << "begin" << endl ;
    int f = open(PIPE_NAME.c_str(),O_RDONLY); 
    cout << "end" << endl;
    assert(f != -1);
     char buffer[1024] = { 0 };
    while(n){
        n = read(f, buffer , sizeof(buffer));
        cout <<"client -> server : "<< buffer << endl;
    }
    Delete_Pipe(PIPE_NAME.c_str());
    return 0;
}